<#if action.packageName!="">
package ${action.packageName};
</#if>

import com.opensymphony.xwork2.ActionSupport;
<#if action.imports?exists>
<#list action.imports as import>
import ${import};
</#list>
</#if>


public class ${genRule.genNameByType(action.baseAlia,"action")?cap_first} extends ActionSupport{
	
	private static final long serialVersionUID = 1L;
	
	
   
    <#---基本po-->
    private ${action.baseAlia?cap_first} ${action.baseAlia?uncap_first};
	<#---example-->
	 
    private ${genRule.genNameByType(action.baseAlia,"example")?cap_first} ${genRule.genNameByType(action.baseAlia,"example")?uncap_first};
	<#---list-->
	 
    private List<${action.baseAlia?cap_first}> ${genRule.genNameByType(action.baseAlia,"list")?uncap_first};
	<#---service-->
     
    private ${genRule.genNameByType(action.baseAlia,"serviceI")?cap_first} ${genRule.genNameByType(action.baseAlia,"service")?uncap_first};
     
     <#---set get 方法-->
     
     public void set${action.baseAlia?cap_first}(${action.baseAlia?cap_first} ${action.baseAlia?uncap_first}){
     this.${action.baseAlia?uncap_first}=${action.baseAlia?uncap_first};
     }
     
     public ${action.baseAlia?cap_first} get${action.baseAlia?cap_first}(){
     return ${action.baseAlia?uncap_first};
     }
     
     public void set${genRule.genNameByType(action.baseAlia,"example")?cap_first}(${genRule.genNameByType(action.baseAlia,"example")?cap_first} ${genRule.genNameByType(action.baseAlia,"example")?uncap_first}){
     this.${genRule.genNameByType(action.baseAlia,"example")?uncap_first}=${genRule.genNameByType(action.baseAlia,"example")?uncap_first};
     }
     
     public ${genRule.genNameByType(action.baseAlia,"example")?cap_first} get${genRule.genNameByType(action.baseAlia,"example")?cap_first}(){
     return ${genRule.genNameByType(action.baseAlia,"example")?uncap_first};
     }
     
     public void set${genRule.genNameByType(action.baseAlia,"list")?cap_first}(List<${action.baseAlia?cap_first}> ${genRule.genNameByType(action.baseAlia,"list")?uncap_first}){
     this.${genRule.genNameByType(action.baseAlia,"list")?uncap_first}=${genRule.genNameByType(action.baseAlia,"list")?uncap_first};
     }
     
     public List<${action.baseAlia?cap_first}> get${genRule.genNameByType(action.baseAlia,"list")?cap_first}(){
     return ${genRule.genNameByType(action.baseAlia,"list")?uncap_first};
     }


     public void set${genRule.genNameByType(action.baseAlia,"service")?cap_first}(${genRule.genNameByType(action.baseAlia,"serviceI")?cap_first} ${genRule.genNameByType(action.baseAlia,"service")?uncap_first}){
        this.${genRule.genNameByType(action.baseAlia,"service")?uncap_first}=${genRule.genNameByType(action.baseAlia,"service")?uncap_first};
     }
     
     public ${genRule.genNameByType(action.baseAlia,"serviceI")?cap_first} get${genRule.genNameByType(action.baseAlia,"service")?cap_first}(){
       return ${genRule.genNameByType(action.baseAlia,"service")?uncap_first};
     }
     
     
	<#---crud 方法-->	
	public String create(){
	  get${genRule.genNameByType(action.baseAlia,"service")?cap_first}().create(${action.baseAlia?uncap_first});
	  return SUCCESS;
	}
	
	public String get(){
	   set${action.baseAlia?cap_first}(get${genRule.genNameByType(action.baseAlia,"service")?cap_first}().get(${action.baseAlia?uncap_first}));
	  return SUCCESS;
	}
	
	
	public String update(){
	  get${genRule.genNameByType(action.baseAlia,"service")?cap_first}().update(${action.baseAlia?uncap_first});
	  return SUCCESS;
	}
	
	public String delete(){
	  get${genRule.genNameByType(action.baseAlia,"service")?cap_first}().delete(${action.baseAlia?uncap_first});
	  return SUCCESS;
	}
	
	 public String list(){
	  set${genRule.genNameByType(action.baseAlia,"list")?cap_first}(get${genRule.genNameByType(action.baseAlia,"service")?cap_first}().list(${genRule.genNameByType(action.baseAlia,"example")?uncap_first}));
	  return SUCCESS;
	}
}
